#ifndef GRAPHICS_H_
#define GRAPHICS_H_

#include "SDL\SDL.h"
#include <string>

class Graphics
{
public:
	Graphics();
	Graphics(const SDL_Surface* surface);
	
	virtual ~Graphics();
	
	void loadImage(char *name, SDL_Surface **dst, int R, int G, int B);
	void drawIMGrect(SDL_Surface *src, SDL_Surface *dst, int x, int y, int w, int h, int destx, int desty);
	void blockFill(SDL_Surface &src, SDL_Surface &dst);
	unsigned int getPixel(SDL_Surface *screen, int x, int y);
	void putPixel(SDL_Surface *screen, int x, int y, int color);
	void drawCircle(SDL_Surface *screen,int x0, int y0, int radius, int color, int filled);
	void drawHorLine(SDL_Surface *screen, int x0, int y0, int x, int color);
	void drawVerLine(SDL_Surface *screen, int x, int y0, int y, int color);
	void generateBackgroundGradient(SDL_Surface *surface, int sColor, int dColor);
	void drawString(SDL_Surface *surface, SDL_Surface *bg, SDL_Surface *fonts, char *s, int x, int y);
	void drawString(SDL_Surface *surface, SDL_Surface *bg, SDL_Surface *fonts, std::string &text, int x, int y);
	void drawCharacter(SDL_Surface *surface, SDL_Surface *bg, SDL_Surface *fonts, int character, int x, int y);
	void drawStdString(SDL_Surface &dst, int x, int y, std::string text);
	
	SDL_Surface* getVehicleImg() const;
	SDL_Surface* getVehicleImg_02() const;
	
	SDL_Surface* getInfobarImg() const;
	SDL_Surface* getNSInfobarImg() const;
	
	SDL_Surface* getAmmoImg() const;
	SDL_Surface* getNSAmmoImg() const;
	
	SDL_Surface* getProju_01Img() const;
	SDL_Surface* getProju_02Img() const;
	
	SDL_Surface* getChImg() const;
	SDL_Surface* getNSChImg() const;
	
	SDL_Surface* getGrassImg() const;
	SDL_Surface* getNSGrassImg() const;
protected:
	static SDL_Surface* font,* vehicleImg,* vehicleImg_02,* infobar,* ammoImage,* proju_01,* proju_02;
	static SDL_Surface* chImg,* grass;
	static int instances;
	
	void loadImages(const SDL_Surface* surface);
	void unLoadImages();
};

#endif /*GRAPHICS_H_*/
